import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'

import MyFilm from '../views/MyFilm.vue'
import MyNews from '../views/MyNews.vue'
import MyCinema from '../views/MyCinema.vue'
import MyCenter from '../views/MyCenter.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path:'/',
    redirect:'/film'
  },{
    path:'/film',
    name:'film',
    component:MyFilm
  },{
    path:'/cinema',
    name:'cinema',
    component:MyCinema
  },{
    path:'/news',
    name:'news',
    component:MyNews
  },{
    path:'/center',
    name:'center',
    component:MyCenter
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
